package websocket.enum_;

/**
 * @author nieruijie
 * @date 2022/5/21 21:04
 */
public enum PosTypeEnum {

    NONE(0, "无解"),
    FIXEDPOS(1, "位置由 FIX POSITION 命令指定"),
    FIXEDHEIGHT(2, "暂不支持"),
    DOPPLER_VELOCITY(8, "速度由即时多普勒信息导出"),
    SINGLE(16, "单点定位"),
    PSRDIFF(17, "伪距差分解"),
    WAAS(18, "SBAS 定位"),
    L1_FLOAT(32, "L1 浮点解"),
    IONOFREE_FLOAT(33, "消电离层浮点解"),
    NARROW_FLOAT(34, "窄巷浮点解"),
    L1_INT(48, "L1 固定解"),
    WIDE_INT(49, "宽巷固定解"),
    NARROW_INT(50, "窄巷固定解"),
    INS(52, "纯惯导定位解"),
    INS_PSRSP(53, "惯导与单点定位组合解"),
    INS_PSRDIFF(54, "惯导与伪距差分定位组合解"),
    INS_RTKFLOA(55, "惯导与载波相位差分浮点解组合解"),
    INS_RTKFIXED(56, "惯导与载波相位差分固定解组合解");

    private Integer index;

    private String msg;

    PosTypeEnum(Integer index, String msg) {
        this.index = index;
        this.msg = msg;
    }

    public static String getMsgByIndex(int index) {
        for (PosTypeEnum item : PosTypeEnum.values()) {
            if (item.index == index) {
                return item.msg;
            }
        }
        return null;
    }
}
